package server.db.primary.mapper.map;

import org.apache.ibatis.annotations.Param;
import server.db.primary.model.map.Affiche;
import server.db.primary.model.map.News;

import java.util.List;

public interface NewsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(News record);

    int insertSelective(News record);

    News selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(News record);

    int updateByPrimaryKey(News record);
//查询全部的新闻信息
    List<News> selectByAll();
    //根据ID查询新闻信息
    List<News> selectById();

//查询最一条数据的流水号id
    List<News> selectBynumberId ();

    List<News> selectByuserId (@Param("userId") Integer userId, @Param("mark1") Integer mark1, @Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd);

    //部门领导查询（待办）
    List<News> selectnotBywelluserId (@Param("userId") Integer userId, @Param("wellUserId") Integer wellUserId, @Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd,@Param("timeStart1") String timeStart1, @Param("timeEnd1") String timeEnd1);

    //部门领导查询（已办）
    List<News> selectBywelluserId (@Param("userId") Integer userId,@Param("wellUserId") Integer wellUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd,@Param("timeStart1") String timeStart1, @Param("timeEnd1") String timeEnd1);

    //部门领导查询（办结）
    List<News> selectBywelluserIdmark (@Param("userId") Integer userId,@Param("wellUserId") Integer wellUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd,@Param("timeStart1") String timeStart1, @Param("timeEnd1") String timeEnd1);
    //公司领导查询（办结）
    List<News> selectBystationuserIdmark (@Param("stationUserId") Integer stationUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd);
    //公司领导查询（已办）
    List<News> selectBystationuserId (@Param("stationUserId") Integer stationUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd);
    //公司领导查询（待办）
    List<News> selectnotBystationuserId (@Param("stationUserId") Integer stationUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd);
    //编辑干事查询（办结）
    List<News> selecteditUserIdmark (@Param("userId") Integer userId,@Param("editUserId") Integer editUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd);

    //编辑干事查询（待办）
    List<News> selectnotByeditUserId  (@Param("userId") Integer userId,@Param("editUserId") Integer editUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd);


    //党群工作部查询（办结）
    List<News> selectpartyUserIdmark (@Param("partyUserId") Integer partyUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd,@Param("userId") Integer userId,@Param("wellUserId") Integer wellUserId,@Param("timeStart1") String timeStart1, @Param("timeEnd1") String timeEnd1);
    //党群工作部查询（已办）
    List<News> selectBypartyUserId (@Param("partyUserId") Integer partyUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd,@Param("userId") Integer userId,@Param("wellUserId") Integer wellUserId,@Param("timeStart1") String timeStart1, @Param("timeEnd1") String timeEnd1);
    //党群工作部查询（待办）
    List<News> selectnotBypartyUserId  (@Param("partyUserId") Integer partyUserId,@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd,@Param("userId") Integer userId,@Param("wellUserId") Integer wellUserId,@Param("timeStart1") String timeStart1, @Param("timeEnd1") String timeEnd1);

    List<News> selectBymark (@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd);

    List<News> selectnotBymark (@Param("mark") Integer mark, @Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd);
    List<News> selectUserId(@Param("userId") Integer userId, @Param("timeStart") String timeStart, @Param("timeEnd")String timeEnd);
}